import axios from '@/libs/request'

/*
管理端登录接口
 */
export const login = ({ userName, password }) => {
  const data = JSON.stringify({
    username: userName,
    password: password
  })
  return axios.request({
    url: '/api/uc/sc/loginService/userLogin',
    data: data,
    type: 'post'
  })
}
export const getUserInfo = () => {
  return axios.request({
    url: '/api/as/info',
    method: 'post',
    data: { a: 1 }
  })
}
export const getJavaMenus = (menu_id) => {
  return axios.request({
    url: '/api/ac/sc/menuService/getVueMenuList',
    data: { menu_id: menu_id },
    type: 'get'
  })
}
export const getPhpMenus = () => {
  return axios.request({
    url: '/wl/menus',
    type: 'get',
    php: true
  })
}
export const insertZlUnity = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZZlUnityService/insertZlUnity',
    // method: 'post',
    data: data,
    type: 'post'
  })
}
// 问题堵漏填报
export const problemPlugging = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlPluggingService/insertZlPlugging',
    data: data,
    type: 'post'
  })
}
// 问题堵漏列表
export const problemPluggingList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlPluggingService/GetZlPluggingList',
    data: data,
    type: 'post'
  })
}
// 业务流程
export const operation = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOperationService/insertZlOperation',
    data: data,
    type: 'post'
  })
}
// 业务流程列表
export const operationList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOperationService/GetZlOperationList',
    data: data,
    type: 'post'
  })
}
// 统一思想
export const GetZlUnityList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZZlUnityService/GetZlUnityList',
    data: data,
    type: 'post'
  })
}
// 组织机构
export const insertOrganization = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOrganizationService/insertOrganization',
    data: data,
    type: 'post'
  })
}
export const GetZlOrganizationList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOrganizationService/GetZlOrganizationList',
    data: data,
    type: 'post'
  })
}
export const getZlOrganizationByID = (data) => {
  return axios.request({
    url: '/api/as/jwork/zlorganization/getZlOrganizationByID',
    data: data,
    type: 'post'
  })
}
// 主页
export const getCountState = (data) => {
  return axios.request({
    url: '/api/as/jwork/zlstate/getCountState',
    data: data,
    type: 'post'
  })
}
// 步骤条 堵漏洞
export const insertZlStatePlugging = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlPluggingService/insertZlStatePlugging',
    data: data,
    type: 'post'
  })
}
// 步骤条 统一思想认识
export const insertZlStateUnity = (data) => {
  return axios.request({
    // url: '/api/as/jwork/zlunity/insertZlStateUnity',
    url: '/api/ac/jwork/jdZZlUnityService/insertZlStateUnity',
    data: data,
    type: 'post'
  })
}
// 步骤条 组织机构
export const insertZlStateOrganization = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOrganizationService/insertZlStateOrganization',
    data: data,
    type: 'post'
  })
}
// 步骤条 业务流程
export const insertZlStateOperation = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOperationService/insertZlState',
    data: data,
    type: 'post'
  })
}
// 步骤条 数量
export const getCountStateList = (data) => {
  return axios.request({
    url: '/api/as/jwork/zlstate/getCountStateList',
    data: data,
    type: 'post'
  })
}
// 问题堵漏 修改
export const updatePlugging = (data) => {
  return axios.request({
    // url: '/api/as/jwork/zlplugging/updatePlugging',
    url: '/api/ac/jwork/jdZlPluggingService/updatePlugging',
    data: data,
    type: 'post'
  })
}
// 思想 修改
export const updateUnity = (data) => {
  return axios.request({
    // url: '/api/as/jwork/zlunity/updateUnity',
    url: '/api/ac/jwork/jdZZlUnityService/updateUnity',
    data: data,
    type: 'post'
  })
}
// 组织 修改
export const updateOrganization = (data) => {
  return axios.request({
    // url: '/api/as/jwork/zlorganization/updateOrganization',
    url: '/api/ac/jwork/jdZlOrganizationService/updateOrganization',
    data: data,
    type: 'post'
  })
}
// 业务流程表 修改
export const updateOperation = (data) => {
  return axios.request({
    // url: '/api/as/jwork/zloperation/updateOperation',
    url: '/api/ac/jwork/jdZlOperationService/updateOperation',
    data: data,
    type: 'post'
  })
}
export const getStateList = (data) => {
  return axios.request({
    url: '/api/as/jwork/zlstate/getStateList',
    data: data,
    type: 'post'
  })
}
// 组织查询状态
export const countOrganizationState = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOrganizationService/countOrganizationState',
    data: data,
    type: 'post'
  })
}
// 思想查询状态
export const countUnityState = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZZlUnityService/countUnityState',
    data: data,
    type: 'post'
  })
}
// 业务流程查询状态
export const countOperationState = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlOperationService/countOperationState',
    data: data,
    type: 'post'
  })
}
// 问题堵漏查询状态
export const countPluggingState = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlPluggingService/countPluggingState',
    data: data,
    type: 'post'
  })
}
// // 组织完成
// export const zzwc = (data) => {
//   return axios.request({
//     url: '/api/ac/jwork/jdZlOrganizationService/insertZlStateOrganization',
//     data: data,
//     type: 'post'
//   })
// }
// // 思想完成
// export const sxwc = (data) => {
//   return axios.request({
//     url: '/api/ac/jwork/jdZZlUnityService/insertZlStateUnity',
//     data: data,
//     type: 'post'
//   })
// }
// // 流程完成
// export const lcwc = (data) => {
//   return axios.request({
//     url: '/api/ac/jwork/jdZlOperationService/insertZlState',
//     data: data,
//     type: 'post'
//   })
// }
// // 问题完成
// export const wcwc = (data) => {
//   return axios.request({
//     url: '/api/ac/jwork/jdZlPluggingService/insertZlStatePlugging',
//     data: data,
//     type: 'post'
//   })
// }
export const GetZlStateList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlStateService/GetZlStateList',
    data: data,
    type: 'post'
  })
}
// 数据采集新增
export const insertZlShiZhi = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlShiZhiService/insertZlShiZhi',
    data: data,
    type: 'post'
  })
}
// 数据采集查询市直分页接口
export const getZlShiZhiList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlShiZhiService/getZlShiZhiList',
    data: data,
    type: 'post'
  })
}
// 数据采集查询市直分页接口
export const getZlShiZhiByIDList = (data) => {
  return axios.request({
    url: '/api/ac/jwork/jdZlShiZhiService/getZlShiZhiByIDList',
    data: data,
    type: 'post'
  })
}
// 市直表上月数据列表
export const getZlShiZhiByCodeList = (data) => {
  return axios.request({
    url: '/api/as/jwork/zlshizhi/getZlShiZhiByCodeList',
    data: data,
    type: 'post'
  })
}
// 纪检组列表增改
export const insertZlDiscipline = (data) => {
  return axios.request({
    url: '/api/as/jwork/zldisciplineinspection/insertZlDiscipline',
    data: data,
    type: 'post'
  })
}
// 纪检组查询上月列表
export const getZlDisciplineByCodeList = (data) => {
  return axios.request({
    url: '/api/as/jwork/zldisciplineinspection/getZlDisciplineByCodeList',
    data: data,
    type: 'post'
  })
}
// 纪检组列表
export const getZlDisciplineList = (data) => {
  return axios.request({
    url: '/api/as/jwork/zldisciplineinspection/getZlDisciplineList',
    data: data,
    type: 'post'
  })
}
